<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>预约挂号</title>
    <link rel="stylesheet" type="text/css" href="css/aui.css" />
		<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body>

    <div class="site-name">
      <p>北京114预约挂号平台</p>
    </div>

    <div class="submit-choose-wrapper">
      <div class="submit-choose">
        <h4>选择就诊人</h4>
        <i class="aui-iconfont aui-icon-right"></i>
      </div>
    </div>

    <div class="submit-title">
      <h4>挂号信息</h4>
    </div>

    <div class="order-item-body" id="my_div_1">

    </div>

    <div class="submit-title">
      <h4>医院预约规则</h4>
    </div>

    <div class="submit-body">
      <p>1、如果您居住或去过辽宁大连等中/高风险地区，请按照北京市防
      疫防控要求，接受新冠排查后再预约就诊，我院对中/高风险地区
      人群进行出入管控。挂号咨询: 010-66939343
      </p>
      <p>2、按中国医学科学院肿瘤医院要求，用户在预约挂号统一平台仅可使用身份证预约挂号，
        预约信息与就诊当日取号患者信息不一致时，医院将不予取预约号；患者取号时，
        需提前告知医院窗口挂号员为114电话或网络预约挂号。
      </p>
      <p>3、特需医疗诊疗费不纳入北京市医疗保险报销范围。
      </p>
      <p>4、只能使用身份证预约，其他证件预约将无法取号。
      </p>
      <p>5、爽约处理：
      </p>
      <p>一年内（自然年）爽约1次，自爽约之日起30日内停止预约挂号服务；</p>
      <p>一年内（自然年）累计爽约2次，自最后一次爽约之日起60日内停止预约挂号服务；</p>
      <p>一年内（自然年）累计爽约3次，自最后一次爽约之日起90日内停止预约挂号服务，以此类推。</p>
      <div class="login-btn">
        <a href="#" id="qrgh">确认挂号</a>
      </div>
    </div>

    <div class="order-layer" style="display:none;">
      <div class="order-layer-title">
        <h4>选择就诊人</h4>
        <i class="aui-iconfont aui-icon-close order-layer-close"></i>
      </div>
        <div id="my_div_2">


        </div>
        <div class="order-layer-body">
            <a href="add.html">+ 添加就诊人</a>
        </div>
    </div>
</body>
<script src="js/jquery.min.js"></script>
<script src="layer/layer.js"></script>
<script type="text/javascript">


  var openid = localStorage.getItem("openid");
  function getreq(name) {
    var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
    var r = window.location.search.substr(1).match(reg);
    if (r != null) {
      return decodeURI(r[2]);
    }
    return null;
  }
  var status = getreq("status")
  var kname = getreq("name");
  var kdata = getreq("data");
  var mid = getreq("mid");
  var str = "<div class=\"order-item-row\">\n" +
          "        <span>就诊日期</span>\n" +
          "        <p>"+kdata+"</p>\n" +
          "      </div>\n" +
          "      <div class=\"order-item-row\">\n" +
          "        <span>就诊医院</span>\n" +
          "        <p>北京医学科学院肿瘤医院</p>\n" +
          "      </div>\n" +
          "      <div class=\"order-item-row\">\n" +
          "        <span>挂号科室</span>\n" +
          "        <p>"+kname+"</p>\n" +
          "      </div>\n" +
          "      <div class=\"order-item-row\">\n" +
          "        <span>医生职称</span>\n" +
          "        <p>普通门诊</p>\n" +
          "      </div>\n" +
          "      <div class=\"order-item-row\">\n" +
          "        <span>医生专长</span>\n" +
          "        <p>"+kname+"常见病</p>\n" +
          "      </div>\n" +
          "      <div class=\"order-item-row\">\n" +
          "        <span>医事服务费</span>\n" +
          "        <p>50元</p>\n" +
          "      </div>";
  $("#my_div_1").html(str)
  $("#qrgh").click(function () {
      location.href="create.html?date="+kdata+"&keshi="+kname+"&zc="+kname+"常见病&idcard="+$(".submit-choose-wrapper").children().find("input").val()+"&status="+status+"&mid="+mid;
  })
$('.submit-choose').click(function () {
  layer.open({
    type: 1,
    anim: 2,
    title: false,
    closeBtn:0,
    offset: 'b',
    area: ['100%','330px'],
    shadeClose: true,
    content: $('.order-layer')
  });
    $.ajax({
        type: "post",
        url: "http://guowang.nat300.top/wechat114/thepatients/selectByopenid",
        data:{"openid":openid},
        async:false,
        dataType: "json",
        success: function (data) {
            var str2 = "";
            for (var i=0;i<data.data.length;i++){
                str2 += "<div class=\"order-layer-body\">\n" +
                    "            <div class=\"order-layer-user\">\n" +
                    "                <div class=\"order-layer-info\">\n" +
                    "                    <h4>"+data.data[i].thepatientname+"</h4>\n" +
                    "                    <p>"+data.data[i].idnum+"</p>\n" +
                    "                </div>\n" +
                    "                <i class=\"aui-iconfont aui-icon-right\"></i>\n" +
                    "                <input type='hidden' value='"+data.data[i].idnum+"'>\n" +
                    "            </div>\n" +
                    "        </div>";
            }
            $("#my_div_2").html(str2)
            $('.order-layer-body').click(function() {
                $(".submit-choose-wrapper").html($(this).html())
                layer.closeAll();
            })
        }
    })
})


</script>
</html>
